package com.kikcn.spring;

import com.kikcn.spring.beans.ByConstructor;
import com.kikcn.spring.beans.BySetter;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Calendar;

/**
 * User: Administrator
 * Date: 2015/3/17
 * Time: 21:57
 */
public class Application {
    public static void main(String [] args){
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext1.xml");
        BySetter bs=(BySetter)context.getBean("bySetter");
        System.out.println(bs.getName());
        bs.xxx();
        ByConstructor bc=(ByConstructor)context.getBean("byConstructor");
        System.out.println(bc.getName());

        Calendar cal=(Calendar)context.getBean("calendar");
        System.out.println(cal.getTime());
    }
}
